<?php
class Application_Form_EstadoForm extends Zend_Form
{
	public function init()
	{
		$this->setAction('')
		     ->setMethod('Post');

		$estado = $this->createElement('text','UF_DESC',array('label'=>'* Estado'));
		$estado->setRequired(true);

		$uf		= $this->createElement('text','UF_SIGLA',array('label'=>'* UF'));
		$uf->setRequired(true)
		   ->addValidator('stringLength',false,array(2,2))
		   ->addValidator('regex',false,array('/^[a-z]+/i'))
		   ->addFilter('stringToUpper');

		$bt_cadastro = $this->createElement('submit','bt_cadastro',array('label'=>'SALVAR'));

		$this->addElements(array($estado,$uf,$bt_cadastro));
		$this->addDisplayGroup(array($estado->getName(),$uf->getName(),$bt_cadastro->getName()),'gp_estado');
	}
}

